#ifndef QxWellDatabaseIO_HPP
#define QxWellDatabaseIO_HPP

#include "QxWellDataIO.hpp"
#include "QxAbstractDatabaseIO.hpp"

class QxWellDatabaseIO : public QxAbstractDatabaseIO, public QxWellDataIO
{
  Q_OBJECT

public:

  QxWellDatabaseIO( const QSqlDatabase& database=QSqlDatabase() );
  virtual ~QxWellDatabaseIO();

  const QString& wellName() const;
  void setWellName( const QString& );

  virtual QxWellInfoDefine wellInfoDefine() const;
  virtual void setWellInfoDefine( const QxWellInfoDefine& );

  virtual QVector<QxWellLogDefine> wellLogDefines() const;
  bool insertWellLogDefine( const QxWellLogDefine& );
  bool removeWellLogDefine( const QxWellLogDefine& );

  virtual QVector<float> data( const QString& wellLogName ) const;
  virtual void setData( const QString& wellLogName, const QVector<float>& data );

  virtual QStringList queryWellLogNames();

  virtual void clear();

  static void createTable( const QSqlDatabase& );

protected:

  virtual void init();

private:

  class QxWellDatabaseIOPrivate;
  QScopedPointer<QxWellDatabaseIOPrivate>         _pd;
};

#endif // QxWellDatabaseIO_HPP